public void PublishBaseData() { PublishHealth(); // publish weapon PlayerController.GetInstance().SetWeapon(weaponUuid, damage); // publish moveData PlayerMoveController2D moveController = PlayerController.GetInstance().moveController; moveController.wallJumpingAllowed = wallJumpAllowed; moveController.doubleJumpAllowed = doubleJumpAllowed; moveController.dashAllowed = dashAllowed; moveController.dashDuration = dashDuration; moveController.stampingAllowed = stompAllowed; }
// Use this for initialization void Awake() { moveController = GetComponent <PlayerMoveController2D>(); soundController = GetComponent <PlayerSounds>(); spriteRenderer = GetComponent <SpriteRenderer>(); boxCollider2D = GetComponent <BoxCollider2D>(); animator = GetComponent <Animator>(); currentState = new SwordUpState(this); statistics = GetComponentInChildren <PlayerStatistics>(); input = GetComponent <InputController>(); hurtBox = GetComponentInChildren <PlayerHurtBox>(); _instance = this; // init weapon and animation layer SetWeapon("-1", 0); }