Пример #1
0
    public void shoot(CharacterControllerPlatformer shooter, Vector3 shootDirection)
    {
        body = shooter.GetComponent <Rigidbody2D>();
        characterController = shooter;
        extensionDirection  = shootDirection.normalized;
        startingVelocity    = body.velocity;
        grappleSites.Add(new GrappleSite(body.transform.position)); // current starting position of rope
        grappleSites.Add(new GrappleSite(body.transform.position)); // current ending position of rope
        currentState = States.Extending;

        getRope().numPositions = grappleSites.Count;
        getRope().SetPositions(grappleSites.Select(g => g.position).ToArray());
    }
Пример #2
0
 void Start()
 {
     ccp = GetComponent <CharacterControllerPlatformer>();
 }