// Use this for initialization void Start() { heroAvatar = GetComponent <HeroAvatar> (); heroMovement = GetComponent <HeroMovement> (); heroCombat = GetComponent <HeroCombat> (); heroHud = GetComponent <HeroHud> (); characterController = GetComponent <CharacterController> (); camera = GetComponentInChildren <Camera>(true); camera.gameObject.tag = "LocalHeroCamera"; }
public void OnHeroPortaitClicked(HeroAvatar heroAvatar) { if (targetOptions != null) { for (int i = 0; i < targetOptions.Count; i++) { if (targetOptions[i].GetType() == typeof(PlayCardOption)) { PlayCardOption pco = targetOptions[i] as PlayCardOption; if (pco.targetGuid == heroAvatar.careAboutGuid) { OptionsManager.Singleton.PickUpOption(pco); targetOptions = null; return; } } } } }
void Start() { resetMovement(); heroAvatar = GetComponent <HeroAvatar> (); characterController = GetComponent <CharacterController>(); camera = GetComponentInChildren <Camera>(true); heroCamera = GetComponent <HeroCamera> (); heroManager = GetComponent <HeroManager> (); heroActionMap = new Dictionary <MovementAction, VoidFunc> { { MovementAction.MinusX, MinusX }, { MovementAction.MinusY, MinusY }, { MovementAction.MinusZ, MinusZ }, { MovementAction.PlusX, PlusX }, { MovementAction.PlusY, PlusY }, { MovementAction.PlusZ, PlusZ }, { MovementAction.MinusYRotate, MinusYRotate }, { MovementAction.PlusYRotate, PlusYRotate }, { MovementAction.ChangeCameraAngle, ChangeCameraAngle }, { MovementAction.ChangeHeroAngle, ChangeHeroAngle }, { MovementAction.ToggleRunWalk, ToggleRunWalk } }; }