示例#1
0
 void Awake()
 {
     statusMap = new StatusMap(this);
     actionMap = new ActionMap(this);
     actionMap.add(ECHO, new Ability(0.5f));
     actionMap.add(ATTACK, new Ability(0.2f));
     rb           = GetComponent <Rigidbody2D>();
     respawnPoint = transform.position;
     gun          = transform.FindChild("gun");
     playerAudio  = GetComponent <AudioSource>();
     gunAudio     = gun.GetComponent <AudioSource>();
 }
示例#2
0
    /*
     * Unity Events
     */

    void Awake()
    {
        nearbyUnits     = new Neighbours <Steering, Steering>(GetComponent <Steering>());
        nearbyBuildings = new Neighbours <Unit, Building>(this);
        statusMap       = new StatusMap(this);
        actionMap       = new ActionMap(this);
        actionMap.add(0, new Ability(fireAbility, 0.1f));
    }
示例#3
0
    public void Start()
    {
        MAXV  = 4f;
        ACCEL = 6f;
        base.Start();

        actionMap = new ActionMap(this);
        actionMap.add(ATTACK, new Ability(1.6f));
    }
    void Start()
    {
        // Constants that are relevant to Steering
        TURN_RATE         = 360f;
        MAXV              = 15f;
        ACCEL             = 40f;
        turnAutomatically = false;

        actionMap = new ActionMap(this);
        actionMap.add(ATTACK, new Ability(0.3f));
        base.Start();
        updateWeapons(level);
    }
示例#5
0
 // Use this for initialization
 void Start()
 {
     actionMap = new ActionMap(this);
     actionMap.add(0, new Ability(3f));
 }