void Awake() { characterMotor = GetComponent <CharacterMotor>(); actionManager = GetComponent <CharacterActionManager>(); animationTarget = PelvisBone.GetComponent <Animation>(); _myTransform = this.transform; }
public virtual void Initialise(Animation target, Transform character, CharacterActionManager actionManager, Collider masterCollider) { characterAnimation = target; characterTransform = character; characterManager = actionManager; characterCollider = masterCollider; }
public override void Awake () { base.Awake(); //input = GetComponent<CharacterInputController>(); myActionManager = GetComponent<CharacterActionManager>(); if(!myStatus.myPhotonView.isMine) enabled = false; }
public void Enable(CharacterActionManager actionManager) { cam = actionManager; if(actionAnimation.clip != null) { StartCoroutine(TransferAnimation(actionAnimation)); Debug.Log("transferring new animation"); } StartCoroutine(MainActionSequence()); }
public virtual void Initialise(PlayerCharacter status, int skillIndex) { ownerStatus = status; ownerManager = ownerStatus.actionManager; ownerCAM = (CharacterActionManager)ownerStatus.actionManager; ownerAnimation = ownerCAM.myAnimation; ownerTransform = ownerStatus._myTransform; skillID = skillIndex; ownerAvatar = ownerCAM.myAvatar; TransferSkillAnimations(); BasicSetup(); }
void Start() { controller = GetComponent <CharacterController>(); input = GetComponent <InputController>(); avatar = GetComponent <Avatar>(); _myTransform = transform; characterVelocity = Vector3.zero; animationManager = GetComponent <CharacterActionManager>(); //rigidbodyTransform = rigidbody.transform; SetRotAngle(_myTransform.position + (Vector3.forward * -10f)); SetRotTarget(); //UpdateAnimation(); }
/***************/ #region skill state #endregion #region setup and unequip public override void Initialise(Animation target, Transform character, CharacterActionManager actionManager, Collider masterCollider) { base.Initialise(target, character, actionManager, masterCollider); TransferAnimations(); if (weaponCollider != null) { TriggerCollider tc = weaponCollider.GetComponent <TriggerCollider>(); if (tc != null) { tc.ownerCollider = characterCollider; tc.IgnoreCollision(); } weaponCollider.SetActive(false); } }
public override void Initialise(Animation target, Transform character, CharacterActionManager actionManager, Collider masterCollider) { base.Initialise(target,character, actionManager, masterCollider); TransferAnimations(); if(weaponCollider != null) { TriggerCollider tc = weaponCollider.GetComponent<TriggerCollider>(); if(tc != null) { tc.ownerCollider = characterCollider; tc.IgnoreCollision(); } weaponCollider.SetActive(false); } }
void Awake() { if (photonView.isMine) { this.enabled = false; // due to this, Update() is not called on the owner client. } latestCorrectPos = transform.position; onUpdatePos = transform.position; _transform = transform; _motor = GetComponent<PlayerMotor>(); myStatus = GetComponent<CharacterStatus>(); actionManager = GetComponent<CharacterActionManager>(); }
// Use this for initialization public override void Awake () { base.Awake(); characterType = CharacterType.Playable; enemyCharacterType = CharacterType.AI; shopItems = new List<ParseInventoryItem>(); playerActionManager = GetComponent<CharacterActionManager>(); if(myPhotonView.isMine) { this.tag = "Player"; } else { this.tag = "OtherPlayer"; avatar.RequestInitInfo(); RequestShopItems(); } }
public void LoadAvatar() { //SUPER HACK if(NetworkManager.Instance.offlineMode || GameManager.Instance.teststate && !GameManager.Instance.newGame) StartNewGame(); avatarObject = PhotonNetwork.Instantiate("PlayerAvatar", SpawnPoint.position , Quaternion.identity, 0) as GameObject; //avatarObject = GameObject.Instantiate(Resources.Load("PlayerAvatar"), SpawnPoint.position, Quaternion.identity) as GameObject; //avatarObject.AddComponent<DontDestroy>(); avatarStatus = avatarObject.GetComponent<PlayerCharacter>(); avatarInput = avatarObject.GetComponent<CharacterInputController>(); avatarActionManager = avatarObject.GetComponent<CharacterActionManager>(); //PlayerMotor cm = avatarObject.GetComponent<PlayerMotor>(); //cm.enabled = true; //avatarInput.enabled = true; avatarNetworkMovement = avatarObject.GetComponent<NetworkCharacterMovement>(); //UICamera.fallThrough = avatarObject; avatar = avatarObject.GetComponent<Avatar>(); avatarPhotonView = avatarObject.GetComponent<PhotonView>(); Invoke("RefreshAvatar", 0.1f); //PlayerCamera.Instance.targetTransform = avatarObject.transform; //LoadCharacterParts(); }
public override void Initialise(Animation target, Transform character, CharacterActionManager actionManager, Collider masterCollider) { base.Initialise(target,character, actionManager, masterCollider); TransferAnimations(); currentAmmoCount = maxAmmoCount; }
// Use this for initialization #region setup and unequip public override void Initialise(Animation target, Transform character, CharacterActionManager actionManager, Collider masterCollider) { base.Initialise(target, character, actionManager, masterCollider); TransferAnimations(); currentAmmoCount = maxAmmoCount; }
void Awake () { myMotor = GetComponent<PlayerMotor>(); myActionManager = GetComponent<CharacterActionManager>(); animationTarget = PelvisBone.GetComponent<Animation>(); _myTransform = this.transform; myStatus = GetComponent<PlayerCharacter>(); LoadBones(); }
public override void Initialise(Animation target, Transform character, CharacterActionManager actionManager, Collider masterCollider) { base.Initialise(target,character, actionManager, masterCollider); TransferAnimations(); Debug.Log("override"); }
void Awake() { characterMotor = GetComponent<CharacterMotor>(); actionManager = GetComponent<CharacterActionManager>(); animationTarget = PelvisBone.GetComponent<Animation>(); _myTransform = this.transform; }
void Start() { controller=GetComponent<CharacterController>(); input = GetComponent<InputController>(); avatar = GetComponent<Avatar>(); _myTransform = transform; characterVelocity = Vector3.zero; animationManager = GetComponent<CharacterActionManager>(); //rigidbodyTransform = rigidbody.transform; SetRotAngle(_myTransform.position+(Vector3.forward * -10f)); SetRotTarget(); //UpdateAnimation(); }
/***************/ #region setup and unequip public override void Initialise(Animation target, Transform character, CharacterActionManager actionManager, Collider masterCollider) { base.Initialise(target, character, actionManager, masterCollider); TransferAnimations(); Debug.Log("override"); }