Ejemplo n.º 1
0
    protected override void Start()
    {
        base.Start();

        gun = Instantiate(gunHolder.GetGunByName("SMG"), gunSpot.position, gunSpot.rotation) as Gun;
        gun.Equip(gunSpot);
    }
Ejemplo n.º 2
0
    // Use this for initialization
    public void Start()
    {
        currHealth         = maxHealth;
        transform.position = new Vector3(transform.position.x, 1f, transform.position.z);

        // Starting gun
        if (equippedGun != null)
        {
            Destroy(equippedGun.gameObject);
        }
        equippedGun = Instantiate(gunHolder.GetGunByName("Pistol"), gunSpot.position, gunSpot.rotation) as Gun;
        equippedGun.Equip(gunSpot);
        if (equippedGun == null)
        {
            Debug.LogError("Pistol not found in gunHolder");
        }
    }