// Start is called before the first frame update void Start() { BlockComponent = GetComponent <DataBlockComponent>(); Rotation = BlockComponent.DataBlock.Rotation; transform.eulerAngles = new Vector3(); TileScript = GetComponent <TileMovingObjectScript>(); TileScript.JumpToTile(BlockComponent.WorldTileX, BlockComponent.WorldTileY); if (BaseMotionSpeed == default) { if (BlockComponent.DataBlock.GetParameterByName <float>("MotionSpeed", out var param)) { BaseMotionSpeed = param.Value; } else { BaseMotionSpeed = 5; } } ChasingSpeed = BaseMotionSpeed * 2; if (BlockComponent.DataBlock.GetParameterByName <float>("Enemy_ChaseSpeed", out var data)) { ChasingSpeed = data.Value; } TileScript.MotionSpeed = BaseMotionSpeed; TileScript.CanMoveOverWorldReservedTiles = false; Rotator = GetComponentInChildren <AngleRotator>(); var loopSource = GetComponent <SoundLoader>().LoopStart("sb-bullyx", out _, true); // walking sound looped if (loopSource != null) { loopSource.volume = .25f; } }