示例#1
0
    private void Awake()
    {
        Give(PrimaryWeapon);
        // Start with weapon loaded
        PrimaryWeaponAmmo -= primaryWeapon.ClipCapacity;
        primaryWeapon.SetClipRemaining(primaryWeapon.ClipCapacity);

        throwingGrenadeGameObject = (GameObject)Instantiate(ThrowingGrenade, Vector3.zero, Quaternion.identity);
        throwingGrenadeGameObject.transform.parent = transform;
        throwingGrenade = throwingGrenadeGameObject.GetComponent<Throwable>();
        throwingGrenade.InitWeapon();
        throwingGrenade.OnThrow += OnThrowGrenade;

        InitKillable(new Vector3(0, 1, 0));

        animator = transform.GetComponent<Animator>();
        //animationControl = transform.FindChild("NewDude").GetComponent<Animation>();
        //torso = transform.FindChild("NewDude").FindChild("Pelvis").FindChild("Chest");
    }