private bool playersWithDifferentParent(List <GameObject> _players) { //Si alguno que no tiene padre foreach (var player in _players) { if ((!player.GetComponent <FusionTrigger>().IsOnFusion) && player.GetComponent <FusionTrigger>().CurrentChimeraParent == null) { return(true); } } List <GameObject> _parents = new List <GameObject>(); //que tengan diferente padre foreach (var player in _players) { FusionTrigger trigger = player.GetComponent <FusionTrigger>(); if (!_parents.Contains(trigger.CurrentChimeraParent.gameObject)) { _parents.Add(trigger.CurrentChimeraParent.gameObject); } } if (_parents.Count > 1) { return(true); } return(false); }
//le envía a la chimera que yo disparé public void pushSendSkill(GameManager.Characters typeCharacter, float pressValue, float skillIndex, int playerID) { FusionTrigger fusiontrigger = GetComponent <FusionTrigger>(); fusiontrigger.CurrentChimeraParent.GetComponent <PhotonChimeraMultiplayerController>().sendFeedBackSkills(typeCharacter, (int)skillIndex, pressValue); _photonView.RPC(SEND_SKILL, RpcTarget.All, typeCharacter, pressValue, skillIndex, playerID); }
private void Start() { if (!isMine()) { Destroy(GetComponent <PlayerInput>()); Destroy(_playerHUD); } _hPControl = GetComponent <PlayerHPControl>(); _playerMovement = GetComponent <PlayerMovement>(); _playerSkills = GetComponent <PlayerSkills>(); _playerAiming = GetComponent <PlayerAiming>(); _fusionTrigger = GetComponent <FusionTrigger>(); _fusionManager = FindObjectOfType <FusionManager>(); addDelegate(); activeComponets(); }
public void pullSendSkill(GameManager.Characters typeCharacter, float pressValue, float skillIndex, int playerID) { FusionTrigger fusiontrigger = GetComponent <FusionTrigger>(); fusiontrigger.CurrentChimeraParent.GetComponent <ChimeraSkillsController>().sendSkill(typeCharacter, pressValue, skillIndex, playerID); }
protected virtual void Awake() { _fusionTriggerRef = GetComponent <FusionTrigger>(); _rb = GetComponent <Rigidbody2D>(); //_anim = GetComponent<Animator>(); }
protected abstract void FuseErrorHandler(Fusion fusion, FusionTrigger trigger, NPNFError error);
protected abstract void FuseDoneHandler(Fusion fusion, FusionTrigger trigger, FormulaResult results);
//Enable and Disable private void OnEnable() { _inputControl.Enable(); _fusionTriggerRef = GetComponent <FusionTrigger>(); }