コード例 #1
0
ファイル: Drop.cs プロジェクト: dwilson123/junglevs
    void OnTriggerEnter(Collider other)
    {
        PCInputManager player = other.gameObject.GetComponent <PCInputManager>();

        if (player != null)
        {
            AddValue(player);

            Destroy(this.gameObject);
        }
    }
コード例 #2
0
    void OnTriggerExit(Collider other)
    {
        PCInputManager pc = other.gameObject.GetComponent <PCInputManager>();

        if (collidedWith != null && collidedWith.GetInstanceID().Equals(pc.GetInstanceID()))
        {
            collidedWith = null;
            spawner.AssignNewTarget(null);
            pulse = false;
        }
    }
コード例 #3
0
    void OnTriggerEnter(Collider other)
    {
        if (collidedWith != null)
        {
            return;
        }

        PCInputManager pc = other.gameObject.GetComponent <PCInputManager>();

        if (pc == null)
        {
            return;
        }

        spawner.AssignNewTarget(pc.gameObject);
        pulse = true;
    }
コード例 #4
0
ファイル: Drop.cs プロジェクト: dwilson123/junglevs
 public abstract void AddValue(PCInputManager gameObject);
コード例 #5
0
 public override void AddValue(PCInputManager player)
 {
     player.AddValue(value);
 }
コード例 #6
0
ファイル: Weapon.cs プロジェクト: dwilson123/junglevs
 // Use this for initialization
 void Start()
 {
     parent = this.gameObject.GetComponentInParent <PCInputManager>();
     team   = parent.team;
 }