// ------------------------------------------------------------------ // 被抓函式. public void BeCaught(GameObject ObjMonster, int iPos) { bBeCaught = true; RoleTalk(true, "Help", 0); // 從可抓佇列中移除. ToolKit.CatchRole.Remove(gameObject); // 拿手電筒的不需要改目標. if (pWeapon != ENUM_Weapon.Light) { ObjTarget = ObjMonster; } // 跟隨抓人者. PlayerFollow pFollow = gameObject.AddComponent <PlayerFollow>(); pFollow.ObjTarget = ObjMonster; pFollow.iPos = iPos; pAction.PlayBreak(); if (ObjShield && ObjShield.GetComponent <Shield>() && ObjShield.GetComponent <Shield>().iCount > 0) { ObjMonster.GetComponent <AIEnemy>().AddHP(-GameDefine.iDamageShield, false); ObjShield.GetComponent <Shield>().CostShield(); Statistics.pthis.RecordShot(ENUM_Damage.Shield); Statistics.pthis.RecordHit(ENUM_Damage.Shield, GameDefine.iDamageShield, true); } }
// Start is called before the first frame update void Start() { source = GetComponent <AudioSource>(); player = GameObject.FindGameObjectWithTag("Player"); playerFollow = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PlayerFollow>(); }
protected override void Start() { base.Start(); attack = GetComponentInChildren<TankgirlAttack>(); speed = Vector3.zero; jumptimer = jumpDelay; camera = GameObject.Find("Main Camera").GetComponent<PlayerFollow>(); originalColor = this.transform.root.GetComponentInChildren<SpriteRenderer>().color; }
private void Start() { PV = GetComponent <PhotonView>(); motor = GetComponent <PlayerMotor>(); skills = GetComponent <PlayerSkills>(); pf = target.GetComponent <PlayerFollow>(); PS.Stop(); if (!PV.IsMine) { motor.TurnOffCam(); } }
private void ChangeCameraOffset(Vector2 offsetCoordinates, float changeDuration) { PlayerFollow camFollow = Camera.main.GetComponent <PlayerFollow>(); if (camFollow) { camFollow.ChangeCameraOffset(offsetCoordinates, changeDuration); } else { Debug.LogWarning("No PlayerFollow Script Found On Main Camera In Tutorial"); } }
// Use this for initialization void Start() { animate = GetComponent <Animator>(); collider = GetComponent <Collider2D>(); follow = GetComponent <PlayerFollow>(); //follow2 = GetComponent<PlayerFollow2>(); if (Camera.main.gameObject.GetComponent <AudioSource>() != null) { allAudios = Camera.main.gameObject.GetComponents <AudioSource> (); } }
// Use this for initialization void Start() { pf = FindObjectOfType <Camera>().GetComponent <PlayerFollow>(); UICanvasPerder = UICanvasMenu = transform.Find("Canvas").transform.Find("Panel Perder").gameObject; UICanvasMenu = transform.Find("Canvas").transform.Find("Panel Menu").gameObject; ali = UICanvasMenu.transform.Find("Lista de Salas").transform.Find("ElementGrid").GetComponent <AddListItem>(); spawnPoints = transform.GetComponentsInChildren <Transform>(); if (!PhotonNetwork.connected) { PhotonNetwork.ConnectUsingSettings("1.0a"); } typedLobby = new TypedLobby("Main", LobbyType.Default); }
// Use this for initialization void Start() { nm = FindObjectOfType <NetworkManager>(); name = name + PhotonNetwork.player.ID.ToString(); pf = GameObject.FindObjectOfType <Camera>().GetComponent <PlayerFollow>(); GetComponent <SpriteRenderer>().color = nm.playerColors[Random.Range(0, nm.playerColors.Length)]; miSprite = GetComponent <SpriteRenderer>(); if (photonView.isMine) { GetComponent <PlayerMotor>().enabled = true; } else { gameObject.tag = "NetworkPlayer"; gameObject.layer = 9; } }
// Use this for initialization void Start() { startPos = transform.position; playerFollow = GetComponent <PlayerFollow>(); followActive = playerFollow.enabled; }
public void Start() { PF = FindObjectOfType <PlayerFollow>(); }
void Start() { player = FindObjectOfType <PlayerFollow>().transform; playerFollow = FindObjectOfType <PlayerFollow>(); mainManager = FindObjectOfType <MainManager>(); }
// Start is called before the first frame update void Start() { playerFollow = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PlayerFollow>(); }
public void RemovePlayerFollow(PlayerFollow playerFollow) { _followRepository.RemovePlayerFollow(playerFollow); }
public void RemovePlayerFollow(PlayerFollow playerFollow) { _context.Remove(playerFollow); }