This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// | |
/// Simple pooling for Unity. | |
/// Author: Martin "quill18" Glaude ([email protected]) | |
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
/// UPDATES: | |
/// 2015-04-16: Changed Pool to use a Stack generic. | |
/// | |
/// Usage: | |
/// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class PingPongTransformAnimation : MonoBehaviour | |
{ | |
public enum Easing { None, Hermite, Sinerp, Coserp, Berp, SmoothStep, | |
CircleLerp }; | |
public Easing easing = Easing.None; | |
public Vector3 positionChangePerSecond; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class PrefabGenerator : MonoBehaviour | |
{ | |
public GameObject prefab; | |
public Transform position; | |
public string triggerTag; | |
void OnTriggerEnter(Collider other) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class AnimateTransform : MonoBehaviour | |
{ | |
public float speed = 1; | |
public Vector3 positionChangePerSecond; | |
public Vector3 rotationChangePerSecond; | |
public Vector3 scaleChangePerSecond; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class PickUpObject : MonoBehaviour { | |
public Transform player; | |
public float throwForce = 10; | |
bool hasPlayer = false; | |
bool beingCarried = false; | |
void OnTriggerEnter(Collider other) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2014 Robert Szabo | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends FragmentActivity { | |
/** | |
* The {@link android.support.v4.view.PagerAdapter} that will provide fragments for each of the sections. We use a | |
* {@link android.support.v4.app.FragmentPagerAdapter} derivative, which will keep every loaded fragment in memory. | |
* If this becomes too memory intensive, it may be best to switch to a | |
* {@link android.support.v4.app.FragmentStatePagerAdapter}. | |
*/ | |
SectionsPagerAdapter mSectionsPagerAdapter; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class Scheduler { | |
/** The schedule list. */ | |
private Matches matches = new Matches(); | |
public Scheduler(Teams participants) { | |
createSchedule(participants); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2010 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
OlderNewer